<?
/*
Galaxy
Author:McFog
*/
defined('IN GALAXY') or exit('McFog');
define('GALAXY_VERSION', '0.0.0');
define('DEBUGGING', 1);

if(DEBUGGING) error_reporting(E_ALL^E_NOTICE);
else error_reporting(0);
@set_magic_quotes_runtime(0);
define('ROOT', substr(dirname(__FILE__), 0, -7).'/');
define('SITEURL', strtolower( ($_SERVER['HTTPS'] == 'on' ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].substr( $_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/') ).'/' ));
define('DATADIR', ROOT.'data/');
define('DATAURL', SITEURL.'data/');
define('CACHEDIR', ROOT.'cache/');
define('CACHEURL', SITEURL.'cahce/');
define('RESDIR', ROOT.'resource/');
define('RESURL', SITEURL.'resource/');

unset($GLOBALS, $_ENV, $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS, $HTTP_SERVER_VARS, $HTTP_ENV_VARS);

$mtime = explode(' ', microtime());
$_ENV['starttime'] = $mtime[1] + $mtime[0];
unset($mtime);

require ROOT.'model/galaxy.php';
$_ENV['g'] = galaxy::getInstance();
$g = &$_ENV['g'];


$_GET			= galaxy::gaddslashes($_GET, 1, TRUE);
$_POST		= galaxy::gaddslashes($_POST, 1, TRUE);
$_COOKIE	= galaxy::gaddslashes($_COOKIE, 1, TRUE);
$_SERVER	= galaxy::gaddslashes($_SERVER);
$_FILES		= galaxy::gaddslashes($_FILES);
$_REQUEST	= galaxy::gaddslashes($_REQUEST, 1, TRUE);

?>